<div class="title">Phiếu trình</div>
<div id="formVaoso">
	<?php echo ($editable)?$this->Form->create('PhieuTrinh', array('type' => 'file', 'inputDefaults' => array('error' => false),'id'=>'XuLy')):""; ?>
	<div id="generalInfo">
		<p>
			<span class="title">Số</span>
			<span><?php echo $this->Form->input('so', array('div' => false, 'label' => false,"style" => "width: 80px;"));?></span>
			<span class="title2">Ngày</span>
			<span><input readonly="true" name="data[PhieuTrinh][ngay_form]" value="<?php echo isset($this->request->data['PhieuTrinh']['ngay']) ? $this->Time->format('d/m/Y', $this->request->data['PhieuTrinh']['ngay']) : $ngay ;?>" style="width: 80px;" class="datetime"/></span>
		</p>
		<p>
			<span class="title">Kính gửi</span>
			<span><?php echo $this->Form->input('kinh_gui', array('div' => false, 'label' => false,"style" => "width: 350px;"));?></span>
		</p>
		<p>
			<span class="title">Cán bộ trình</span>
			<span><?php echo $this->Form->input('can_bo_trinh', array('div' => false, 'label' => false,"style" => "width: 150px;"));?></span>
		</p>
		<p>
			<span class="title">Về việc</span>
			<span><?php echo $this->Form->input('ve_viec', array('div' => false, 'label' => false,"style" => "width: 855px;"));?></span>
		</p>
		<p>
			<span class="title">Văn bản đính kèm</span>
			<span><?php if(isset($this->request->data['PhieuTrinh']['phieu_trinh_file'])):?>
			<a href="<?php echo FULL_BASE_URL.'/files/phieutrinh/'.$this->request->data['PhieuTrinh']['phieu_trinh_file']?>"><?php echo $this->request->data['PhieuTrinh']['phieu_trinh_file']?></a>
			<?php endif ?>
			<?php echo $this->Form->input('phieu_trinh', array('label' => false,'div' => false,'type' => 'file'));?></span>
		</p>
		<p>
			<span class="title">Ý kiến để xuất của cán bộ xử lý</span>
			<span><textarea name="data[PhieuTrinh][y_kien_ca_bo_xuly]" style="width: 855px; height: 50px;"><?php echo isset($this->request->data['PhieuTrinh']['y_kien_ca_bo_xuly'])?($this->request->data['PhieuTrinh']['y_kien_ca_bo_xuly']):"";?></textarea></span>
			<span></span>
		</p>
		<p>
			<span class="title">Ý kiến kiểm duyệt</span>
			<span><textarea name="data[PhieuTrinh][y_kien_kiem_duyet]" style="width: 855px; height: 50px;"><?php echo isset($this->request->data['PhieuTrinh']['y_kien_kiem_duyet'])?$this->request->data['PhieuTrinh']['y_kien_kiem_duyet']:"";?></textarea></span>
		</p>
		<p>
			<span class="title">Ý kiến lãnh đạo</span>
			<span><textarea name="data[PhieuTrinh][y_kien_lanh_dao]" style="width: 855px; height: 50px;"><?php echo isset($this->request->data['PhieuTrinh']['y_kien_lanh_dao'])?$this->request->data['PhieuTrinh']['y_kien_lanh_dao']:"";?></textarea></span>
		</p>
	</div>
	</p>
	<hr style="color: #1F7BC3;" />
	<div id="buttons" style="text-align: center;">
		<?php if($editable): ?>
		<button class="button blue" id="save">Lưu</button>
		<?php endif;?>
		<button class="button blue" id="print">In</button>
		<?php echo $this->Html->link('Thoát',array('action' => 'kyduyet', $selectedHoso), array('id' => 'back', 'class' => 'button blue'));?>
		<div class="clear"></div>
	</div>
    <input type="hidden" name="data[PhieuTrinh][hoso_id]" value="<?php echo $selectedHoso; ?>"/> 
	<?php echo ($editable)?$this->Form->end():"";?>
</div>
<script type="text/javascript">
	var form = $("#XuLy");
	$(document).ready(function (){
		var editable = <?php echo $editable;?>;
		editable && $("input,textarea").attr("disabled", "disabled");
		$("input.datetime").datepicker({dateFormat:"dd/mm/yy",changeYear: true });
	});
</script>